package com.sky.Task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Slf4j
//@Component
public class MyTask {
    @Scheduled (cron = "0/3 * * * * ? ")
    public void task1(){
        log.info("莫妮卡 ：这是定时任务Spring task的学习演示，不用在意,{}",new Date());
    }
}
